/**
 * @author        Nicolas Bottarini <nicolasbottarini@gmail.com>, 404 <http://www.proyecto404.com>
 * @version       $Rev: 3 $
 * @lastrevision  $Date: 2011-09-12 16:45:37 +0000 (Mon, 12 Sep 2011) $	 
 */
package com.proyecto404.core.collections {
	import com.proyecto404.core.IBaseObject;
	
	public interface ICollection extends IBaseObject, IIterable {

		function count():int;
		
		function isEmpty():Boolean;
		
		function contains(value:*):Boolean;
		
		function clear():void;
		
		function toList():IList;
		
		function toArray():Array;
		
		function toSet():ISet;
		
		function add(value:*):void;
		
		function remove(value:*):void;
		
		function removeFromArray(array:Array):void;
		
		function removeFromCollection(collection:ICollection):void;

		function addFromArray(array:Array):void;
		
		function addFromCollection(collection:ICollection):void;
		
		function asReadOnly():ICollection;
		
		function implode(separator:String = ","):String;
		
		function collect(criteria:Function):ICollection;
		
		function forEach(callback:Function):void;
		
		function map(convert:Function):ICollection;
		
		function all(criteria:Function):Boolean;
		
		function any(criteria:Function):Boolean;
	}
}